<%--
  Created by IntelliJ IDEA.
  User: liuliu
  Date: 2017/11/7
  Time: 16:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<% String path = request.getContextPath();%>

<html>
<head>
    <title>Title</title>
    <script src="<%=path%>/static/js/base.js"></script>
    <script src="<%=path%>/static/js/jquery-1.9.1.min.js"></script>
</head>
<body>


<h1>欢迎${user.username }光临!请选择你的操作:</h1><br>

path:<%=path%>
<a href="http://localhost:80/test">http://localhost:80/test</a>
<div></div>
<a href="http://localhost:80/login/checkLogin?username=xiaoming&password=123456">http://localhost:80/login/checkLogin</a>
<div onclick="fff()" style="cursor: default;"> ajax test </div>



<script>

    function fff()
    {

        var params = {aa:3};
        $.ajax
        ({
            type : 'post',
            url : 'a/demo?tag=1',
            data :params,
            dataType : 'json',
            cache : false,
            success : function(data)
            {
               alert(data);
               alert(JSON.stringify(data) );
//               window.location.href = data.url+ data.params1;
            }
        });
    }


</script>
</body>
</html>
